.class Lcom/estrongs/android/ui/dialog/i$b;
.super Landroid/widget/BaseAdapter;
.source "AppSelectDialog.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/estrongs/android/ui/dialog/i;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = "b"
.end annotation


# instance fields
.field a:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Landroid/content/pm/ApplicationInfo;",
            ">;"
        }
    .end annotation
.end field

.field final synthetic b:Lcom/estrongs/android/ui/dialog/i;


# direct methods
.method public constructor <init>(Lcom/estrongs/android/ui/dialog/i;Z)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/estrongs/android/ui/dialog/i$b;->b:Lcom/estrongs/android/ui/dialog/i;

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    return-void
.end method


# virtual methods
.method public a(Ljava/util/List;)V
    .locals 0
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Landroid/content/pm/ApplicationInfo;",
            ">;)V"
        }
    .end annotation

    .line 1
    iput-object p1, p0, Lcom/estrongs/android/ui/dialog/i$b;->a:Ljava/util/List;

    return-void
.end method

.method public getCount()I
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/i$b;->a:Ljava/util/List;

    if-eqz v0, :cond_0

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    :goto_0
    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/i$b;->a:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p1

    return-object p1
.end method

.method public getItemId(I)J
    .locals 2

    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 4

    if-nez p2, :cond_0

    .line 1
    iget-object p2, p0, Lcom/estrongs/android/ui/dialog/i$b;->b:Lcom/estrongs/android/ui/dialog/i;

    iget-object p2, p2, Lcom/estrongs/android/ui/dialog/q;->mContext:Landroid/content/Context;

    invoke-static {p2}, Lcom/estrongs/android/pop/esclasses/h;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object p2

    const p3, 0x7f0c0067

    const/4 v0, 0x0

    invoke-virtual {p2, p3, v0}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    .line 2
    new-instance p3, Lcom/estrongs/android/ui/dialog/i$c;

    invoke-direct {p3, v0}, Lcom/estrongs/android/ui/dialog/i$c;-><init>(Lcom/estrongs/android/ui/dialog/i$a;)V

    const v0, 0x7f09051a

    .line 3
    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p3, Lcom/estrongs/android/ui/dialog/i$c;->a:Landroid/widget/ImageView;

    const v0, 0x7f0908f9

    .line 4
    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p3, Lcom/estrongs/android/ui/dialog/i$c;->b:Landroid/widget/TextView;

    .line 5
    invoke-static {}, Lcom/estrongs/android/ui/theme/b;->r()Lcom/estrongs/android/ui/theme/b;

    move-result-object v1

    const v2, 0x7f060294

    invoke-virtual {v1, v2}, Lcom/estrongs/android/ui/theme/b;->a(I)I

    move-result v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V

    const v0, 0x7f090b46

    .line 6
    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p3, Lcom/estrongs/android/ui/dialog/i$c;->c:Landroid/widget/ImageView;

    .line 7
    iget-object v1, p0, Lcom/estrongs/android/ui/dialog/i$b;->b:Lcom/estrongs/android/ui/dialog/i;

    iget-object v1, v1, Lcom/estrongs/android/ui/dialog/q;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f080528

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 8
    iget-object v0, p3, Lcom/estrongs/android/ui/dialog/i$c;->c:Landroid/widget/ImageView;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setFocusable(Z)V

    .line 9
    invoke-virtual {p2, p3}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    goto :goto_0

    .line 10
    :cond_0
    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object p3

    check-cast p3, Lcom/estrongs/android/ui/dialog/i$c;

    :goto_0
    const/4 v0, 0x0

    .line 11
    invoke-virtual {p2, v0}, Landroid/view/View;->setFocusable(Z)V

    .line 12
    iget-object v1, p0, Lcom/estrongs/android/ui/dialog/i$b;->a:Ljava/util/List;

    invoke-interface {v1, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Landroid/content/pm/ApplicationInfo;

    .line 13
    iget-object v1, p0, Lcom/estrongs/android/ui/dialog/i$b;->b:Lcom/estrongs/android/ui/dialog/i;

    invoke-static {v1}, Lcom/estrongs/android/ui/dialog/i;->a(Lcom/estrongs/android/ui/dialog/i;)Ljava/util/HashMap;

    move-result-object v1

    iget-object v2, p1, Landroid/content/pm/ApplicationInfo;->packageName:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/graphics/drawable/Drawable;

    if-nez v1, :cond_1

    .line 14
    :try_start_0
    iget-object v2, p0, Lcom/estrongs/android/ui/dialog/i$b;->b:Lcom/estrongs/android/ui/dialog/i;

    iget-object v2, v2, Lcom/estrongs/android/ui/dialog/i;->b:Landroid/content/pm/PackageManager;

    iget-object v3, p1, Landroid/content/pm/ApplicationInfo;->packageName:Ljava/lang/String;

    invoke-virtual {v2, v3}, Landroid/content/pm/PackageManager;->getApplicationIcon(Ljava/lang/String;)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    .line 15
    iget-object v2, p0, Lcom/estrongs/android/ui/dialog/i$b;->b:Lcom/estrongs/android/ui/dialog/i;

    invoke-static {v2}, Lcom/estrongs/android/ui/dialog/i;->a(Lcom/estrongs/android/ui/dialog/i;)Ljava/util/HashMap;

    move-result-object v2

    const-string v3, "appInfo.packageName"

    invoke-virtual {v2, v3, v1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    :try_end_0
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    .line 16
    :catch_0
    :cond_1
    iget-object v2, p3, Lcom/estrongs/android/ui/dialog/i$c;->a:Landroid/widget/ImageView;

    invoke-virtual {v2, v1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 17
    iget-object v1, p1, Landroid/content/pm/ApplicationInfo;->packageName:Ljava/lang/String;

    .line 18
    :try_start_1
    iget-object v2, p0, Lcom/estrongs/android/ui/dialog/i$b;->b:Lcom/estrongs/android/ui/dialog/i;

    iget-object v2, v2, Lcom/estrongs/android/ui/dialog/i;->b:Landroid/content/pm/PackageManager;

    iget-object v3, p0, Lcom/estrongs/android/ui/dialog/i$b;->b:Lcom/estrongs/android/ui/dialog/i;

    iget-object v3, v3, Lcom/estrongs/android/ui/dialog/i;->b:Landroid/content/pm/PackageManager;

    .line 19
    invoke-virtual {v3, v1, v0}, Landroid/content/pm/PackageManager;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;

    move-result-object v0

    .line 20
    invoke-virtual {v2, v0}, Landroid/content/pm/PackageManager;->getApplicationLabel(Landroid/content/pm/ApplicationInfo;)Ljava/lang/CharSequence;

    move-result-object v0

    .line 21
    invoke-interface {v0}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v1
    :try_end_1
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_1 .. :try_end_1} :catch_1

    .line 22
    :catch_1
    iget-object v0, p3, Lcom/estrongs/android/ui/dialog/i$c;->b:Landroid/widget/TextView;

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 23
    iget-object p3, p3, Lcom/estrongs/android/ui/dialog/i$c;->c:Landroid/widget/ImageView;

    new-instance v0, Lcom/estrongs/android/ui/dialog/i$b$a;

    invoke-direct {v0, p0, p1, v1}, Lcom/estrongs/android/ui/dialog/i$b$a;-><init>(Lcom/estrongs/android/ui/dialog/i$b;Landroid/content/pm/ApplicationInfo;Ljava/lang/String;)V

    invoke-virtual {p3, v0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    return-object p2
.end method
